<%@page pageEncoding="UTF-8"%>
<%@ include file="../WEB-INF/jspf/cabecalho.jspf" %>
<%@ include file="../WEB-INF/jspf/acesso.jspf" %>
<%@ include file="../WEB-INF/jspf/setMeta.jspf" %>

<sql:query var='rsetReg' dataSource='${con}'>    
    SELECT * FROM Solicitacao     
    WHERE idSolicitacao = '<c:out value="${param.chv1}"/>'
</sql:query>

<sql:query var='rsetSolucaoAdotada' dataSource='${con}'>    
    SELECT dataSolucao, horaSolucao, tecnicoResponsavel, resumoSolucao FROM SolucaoAdotada     
    WHERE idSolicitacao = '<c:out value="${param.chv1}"/>'
</sql:query>


<form name="form1" method="post" action="">
  <fieldset>
  <legend><font color="#0000FF"><strong>Solicita&ccedil;&atilde;o nº <c:out value="${param.chv1}"/></strong></font></legend>
    <br/>
  <table  align="center" width="80%" border="0">
    <tr bgcolor="#FFFFFF"> 
      <td colspan="6"><table align="right" width="15%" border="1" bordercolor="#0000FF">
          <tr bgcolor="#00CCFF"> 
            <td width="20%" colspan="6"><div align="center"><strong>Manuten&ccedil;&atilde;o</strong></div></td>
          </tr>
          <tr>
            <td><div align="center"><a href="editarSolicitacao.jsp?chv1=<c:out value="${param.chv1}"/>"><img src="imagens/icones/editar.gif" alt="Visualizar a solicita&ccedil;&atilde;o" width="16" height="16" border="0" /></a></div></td>
            <td><div align="center"><img src="imagens/icones/delegar.gif" onclick="javascript:window.open('delegarSolicitacaoDeAtendimento.jsp?chv1=<c:out value="${param.chv1}"/>','teste','height=500,width=400,scrollbars=yes,status=yes,left = 300,top=100')" style="cursor:hand" width="16" height="16" border="0" /></a></div></td>
            <td><div align="center"><img src="imagens/icones/solucao.gif" onclick="javascript:window.open('registrarSolucaoAdotada.jsp?chv1=<c:out value="${param.chv1}"/>','teste','height=400,width=600,scrollbars=yes,status=yes,left = 300,top=100')" style="cursor:hand" width="16" height="16" border="0" /></a></div></td>
            <td><div align="center"><img src="imagens/icones/finalizar.gif" onclick="javascript:window.open('finalizarSolicitacaoDeAtendimento.jsp?chv1=<c:out value="${param.chv1}"/>','teste','height=500,width=400,scrollbars=yes,status=yes,left = 300,top=100')" style="cursor:hand" width="16" height="16" border="0" /></a></div></td>
            <td><div align="center"><img src="imagens/icones/arquivar.gif" onclick="javascript:window.open('arquivarSolicitacaoDeAtendimento.jsp?chv1=<c:out value="${param.chv1}"/>','teste','height=500,width=400,scrollbars=yes,status=yes,left = 300,top=100')" style="cursor:hand" width="16" height="16" border="0" /></a></div></td>
            <td><div align="center"><img src="imagens/icones/historico.gif" onclick="javascript:window.open('visualizarHistoricoDoAtendimento.jsp?chv1=<c:out value="${param.chv1}"/>','teste','height=500,width=600,scrollbars=yes,status=yes,left = 300,top=100')" style="cursor:hand" width="16" height="16" border="0" /></a></div></td>
          </tr>
        </table></td>
    </tr>
    <tr bgcolor="#00CCFF"> 
      <td colspan="6"> <div align="center"><strong>Solicitante</strong></div></td>
    </tr>
    <tr> 
      <td colspan="6">&nbsp;</td>
    </tr>
    <tr bgcolor="#CCCCCC"> 
      <td width="10%"><strong>Data:</strong></td>
      <td width="10%"><input name="dataAbertura" type="text" value="<c:out value="${rsetReg.rowsByIndex[0][1]}"/>" size="10" readonly="" /></td>
      <td colspan="2"> <input name="horaAbertura" type="text" value="<c:out value="${rsetReg.rowsByIndex[0][2]}"/>" size="10" readonly="" /></td>
      <td width="18%"><strong>Solicita&ccedil;&atilde;o n&deg;.:</strong></td>
      <td width="18%"><input name="idSolicitacao" type="text" value="<c:out value="${rsetReg.rowsByIndex[0][0]}"/>" size="10" readonly="" /></td>
    </tr>
    <tr bgcolor="#CCCCCC"> 
      <td><strong>Cliente:</strong></td>
      <td colspan="3"><input name="cliente" type="text" value="<c:out value="${rsetReg.rowsByIndex[0][3]}"/>" size="30" readonly=""/></td>
      <td><strong>Cidade:</strong></td>
      <td><input name="cidade" type="text" value="<c:out value="${rsetReg.rowsByIndex[0][4]}"/>" size="25" readonly="" /></td>
    </tr>
    <tr bgcolor="#CCCCCC"> 
      <td><strong>Solicitante:</strong></td>
      <td colspan="3"><input name="solicitante" type="text" value="<c:out value="${rsetReg.rowsByIndex[0][5]}"/>" size="50" readonly="" /></td>
      <td><strong>Email:</strong></td>
      <td><input name="email" type="text" value="<c:out value="${rsetReg.rowsByIndex[0][6]}"/>" size="25" readonly="" /></td>
    </tr>
    <tr bgcolor="#CCCCCC"> 
      <td><strong>Setor/Dep:</strong></td>
      <td colspan="3"><input name="setorDepartamento" type="text" value="<c:out value="${rsetReg.rowsByIndex[0][7]}"/>" size="30" readonly="" /></td>
      <td><strong>Telefone:</strong></td>
      <td><input name="telefone" type="text" value="<c:out value="${rsetReg.rowsByIndex[0][8]}"/>" size="25" readonly=""/></td>
    </tr>
    <tr> 
      <td colspan="6">&nbsp;</td>
    </tr>
    <tr bgcolor="#00CCFF"> 
      <td colspan="6"> <div align="center"><strong>Solicita&ccedil;&atilde;o</strong></div></td>
    </tr>
    <tr> 
      <td colspan="6">&nbsp;</td>
    </tr>
    <tr bgcolor="#CCCCCC"> 
      <td height="26"><strong>Assunto</strong>:</td>
      <td colspan="5"><input name="email2" type="text" value="<c:out value="${rsetReg.rowsByIndex[0][10]}"/>" size="50" readonly="" /></td>
    </tr>
    <tr bgcolor="#CCCCCC"> 
      <td><strong>Solicita&ccedil;&atilde;o:</strong></td>
      <td colspan="5"><input name="email3" type="text" value="<c:out value="${rsetReg.rowsByIndex[0][11]}"/>" size="70" readonly=""/></td>
    </tr>
    <tr bgcolor="#CCCCCC"> 
      <td><strong>Descri&ccedil;&atilde;o:</strong></td>
      <td colspan="5"><textarea name="textarea" value=""  cols="110" rows="5" readonly="" ><c:out value="${rsetReg.rowsByIndex[0][12]}"/></textarea></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td colspan="6">&nbsp;</td>
    </tr>
    <tr bgcolor="#00CCFF"> 
      <td colspan="6"><div align="center"><strong>Atendimento</strong></div></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td colspan="6">&nbsp;</td>
    </tr>
    <tr bgcolor="#CCCCCC"> 
      <td><strong>Equipe(UG):</strong></td>
      <td colspan="5"><input name="equipe" type="text" value="<c:out value="${rsetReg.rowsByIndex[0][13]}"/>" size="20" readonly=""/></td>
    </tr>
    <tr bgcolor="#CCCCCC"> 
      <td><strong>T&eacute;cnico:</strong></td>
      <td colspan="5"><input name="tecnico" type="text" value="<c:out value="${rsetReg.rowsByIndex[0][14]}"/>" size="50" readonly="" /></td>
    </tr>
    <tr bgcolor="#CCCCCC"> 
      <td><div align="left"><strong> Status:</strong></div></td>
      <td colspan="2"><input name="status" type="text" value="<c:out value="${rsetReg.rowsByIndex[0][15]}"/>" size="20" readonly="" /></td>
     <td><div align="left"><strong> Executado:</strong></div></td>
      <td colspan="4"><input name="percentual" type="text" value="<c:out value="${rsetReg.rowsByIndex[0][16]}"/>" size="20" readonly="" /> 
        <strong>%</strong> </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td colspan="6">&nbsp;</td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td colspan="6" bgcolor="#00CCFF"><div align="center"><strong>Qualidade 
          do Atendimento</strong></div></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td colspan="6">&nbsp;</td>
    </tr>
    <tr bgcolor="#CCCCCC"> 
      <td colspan="2"><strong>Data da Finaliza&ccedil;&atilde;o:</strong></td>
      <td colspan="4"><input name="dataFinalizacao" type="text" value="<c:out value="${rsetReg.rowsByIndex[0][17]}"/>" size="10" readonly="" /> 
        <input name="horaFinalizacao" type="text" value="<c:out value="${rsetReg.rowsByIndex[0][18]}"/>" size="10" readonly="" /> 
      </td>
    </tr>
    <tr bgcolor="#CCCCCC"> 
      <td colspan="3"><strong>Atendente respons&aacute;vel pelo registro inicial:</strong></td>
      <td colspan="3"><input name="atendenteInicial" type="text" value="<c:out value="${rsetReg.rowsByIndex[0][19]}"/>" size="50" readonly="" /></td>
    </tr>
    <tr bgcolor="#CCCCCC"> 
      <td colspan="3"><strong>T&eacute;cnico respons&aacute;vel por finalizar 
        a solicita&ccedil;&atilde;o:</strong></td>
      <td colspan="3"><input name="tecnicoFinalizador" type="text" value="<c:out value="${rsetReg.rowsByIndex[0][20]}"/>" size="50" readonly="" /></td>
    </tr>
    <tr bgcolor="#CCCCCC"> 
      <td colspan="3"><strong>Atendente respons&aacute;vel por arquivar a solicita&ccedil;&atilde;o:</strong></td>
      <td colspan="3"><input name="atendenteArquivador" type="text" value="<c:out value="${rsetReg.rowsByIndex[0][21]}"/>" size="50" readonly="" /></td>
    </tr>
    <tr bgcolor="#CCCCCC"> 
      <td colspan="3"><strong>Tempo utilizado para o atendimento:</strong></td>
      <td colspan="3"><input name="tempoAtendimento" type="text" value="<c:out value="${rsetReg.rowsByIndex[0][22]}"/>" size="10" readonly="" /></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td colspan="6">&nbsp;</td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td colspan="2" bgcolor="#CCCCCC"><strong>Observa&ccedil;&otilde;es:</strong></td>
      <td colspan="4" bgcolor="#CCCCCC"><textarea name="textarea2" value="" cols="80" rows="2" readonly="" ><c:out value="${rsetReg.rowsByIndex[0][26]}"/></textarea> 
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td colspan="6">&nbsp;</td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td colspan="6" bgcolor="#00CCFF"><div align="center"><strong>Solu&ccedil;&otilde;es Adotadas</strong></div></td>
    </tr>
    <c:forEach var="row" items="${rsetSolucaoAdotada.rowsByIndex}">
    <tr bgcolor="#FFFFFF"> 
        <td colspan="6"></td>
    </tr>    
    <tr > 
    <td colspan="6"><strong>&nbsp;</strong></td>
    </td>
    <tr> 
    <td colspan="6">
        <table width="100%" bgcolor="#CCCCCC">
            <tr> 
                <td><strong>Data de preenchimento:</strong></td>
                <td> <input type="text" name="dataSolucao" size="10" value="${row[0]}" readonly="" />
                <input type="text" name="horaSolucao" size="8" value="${row[1]}" readonly="" /></td>
            </tr>
            <tr> 
                <td><strong>Respons&aacute;vel:</strong></td>
                <td><input type="text" name="tecnicoResponsavel" size="50" value="${row[2]}" readonly=""/></td>
            </tr>
            <tr> 
                <td ><strong>Resumo da solu&ccedil;&atilde;o adotada:</strong></td>
                <td colspan="5"><textarea name="textarea2" value="" cols="80" rows="2" readonly="" >${row[3]}</textarea> 
                </td>
            </tr>
            <tr> 
                <td>&nbsp;</td>
            </tr>
        </table>
    </td>
    </c:forEach>
  </table>
  <p>&nbsp;</p>
  </fieldset>
</form>

</body>
</html>
